﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Entities.Content.Common;
using DotNetNuke.Entities.Content;
using DotNetNuke.Common.Utilities;

namespace DotNetNuke.Modules.mytargetmodule.Components.Taxanomy
{
    public class Term
    {
        public void ManageTestTerms(Task objtask, ContentItem objcontent)
        {
            RemoveTaskTerms(objcontent);

            foreach (var term in objtask.Terms)
            {
                Util.GetTermController().AddTermToContent(term, objcontent);
            }

        }

        public void RemoveTaskTerms(ContentItem objcontent)
        {
            Util.GetTermController().RemoveTermsFromContent(objcontent);
        }
    }
}